Skip to content

ci: declare contents:read on Build and Test workflow#621

Closed
arpitjain099 wants to merge 1 commit into
uber:masterfrom
arpitjain099:chore/build-and-test-permissions
Closed

ci: declare contents:read on Build and Test workflow#621
arpitjain099 wants to merge 1 commit into
uber:masterfrom
arpitjain099:chore/build-and-test-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

build-and-test.yaml is the only Kraken workflow that doesn't declare a permissions: block. labeler.yml ties its own scopes down inside the job, and vulnerability-check.yaml declares contents: read + security-events: write per job.

This patch adds permissions: contents: read at workflow scope. All four jobs (lint, build, unit_tests, integration_tests) only call actions/checkout, actions/setup-go, golangci-lint, go test, and Make targets, so contents: read is enough. Several third-party actions are pulled in (golangci/golangci-lint-action, docker/setup-docker-action), which is the case worth narrowing the token for.

No behavioural change. The change is one block in one file.

The lint/build/unit_tests/integration_tests jobs only checkout sources
and run Go and Make targets. None of them call the GitHub API beyond
the implicit checkout read. Declaring `permissions: contents: read` at
workflow scope makes that explicit and matches the per-job style used
by labeler.yml and vulnerability-check.yaml.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 14, 2026

CLA assistant check
All committers have signed the CLA.

@thijmv
Copy link
Copy Markdown
Collaborator

thijmv commented May 18, 2026

Thank you for the PR.

Since our actions already run with read-only tokens by default, the four listed jobs already have limited permissions.

We are therefore closing this PR.

@thijmv thijmv closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants